﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace H2TWindowsForms
{
    public partial class Frm_Search : Form
    {
        public string TypeOpen = "";
        public Frm_Search()
        {
            InitializeComponent();
        }

        private void Frm_Search_Load(object sender, EventArgs e)
        {
            switch (TypeOpen)
            {
                case "Product": // onload for product here
                    {
                        loadProduct();
                    }
                    break;
                case "Category": // onload for catetgory here
                    {
                        loadCategory();
                    }
                    break;
                case "Order": // onload for catetgory here
                    {
                        loadOrder();
                    }

                    break;
            }
        }

        public void loadProduct()
        {
            this.Text = "Search Product";
            this.txtProduct.Visible = true;
            this.label1.Visible = true;
            this.label2.Visible = true;
            this.cmbCategory.Visible = true;
        }

        public void loadOrder()
        {
            this.Text = "Search Order";
            this.txtCategor_Order.Visible = true;
            this.label3.Text = "Order Name: ";
            this.label3.Visible = true;
       
        }

         public void loadCategory()
        {
            this.Text = "Search Category";
            this.txtCategor_Order.Visible = true;
            this.label3.Text = "Category Name: ";
            this.label3.Visible = true;
         
        }



    }
}
